#include <iostream>
#include <string>


class CKWorkTest
{
public:
	std::string m_str;
	CKWorkTest(std::string init)
	{
		m_str = init;
	}
	
	
	std::string DoingWork(std::string strOtherParams)
	{
		std::cout<<m_str.c_str();
		if(!strOtherParams.empty())
		{
			std::cout<<"----"<<strOtherParams.c_str();
		}
		std::cout<<std::endl;
		// if( "aaaaaaaaa" == m_str)
		if(10 <= m_str.size())
		{
			return "";
		}
		else if("a" == m_str)
		{
			m_str = "aa+aa+aaa";
			return m_str;
		}
		else 
		{
			m_str += "a";
			return m_str;
		}
	}
};


extern "C" void* GetObject(std::string init)
{
	return (void*)(new CKWorkTest(init));
}


extern "C" void DelObject(void* obj)
{
	delete obj;
}


extern "C" std::string DoingWork(void* obj, std::string strOtherParams)
{
	CKWorkTest* wt = static_cast<CKWorkTest*>(obj);
	return wt->DoingWork(strOtherParams);
}
